use serde::{Deserialize, Serialize};

use derivative::Derivative;
#[rbatis::crud_table(table_name:"quizzes")]
#[derive(Serialize, Deserialize, Clone, Derivative, Debug)]
#[derivative(Default)]
pub struct QuizDBO {
  pub id: String,
  pub seq: Option<u32>,
  pub level: Option<String>,
  pub subject: String,
  pub m3u8: Option<String>,
  pub title: Option<String>,
  pub description: Option<String>,
  pub created_at: i64,
  pub updated_at: i64,
  pub status: Option<String>,
  pub folder_id: String,
}

#[rbatis::crud_table(table_name:"quizitems")]
#[derive(Serialize, Deserialize, Clone, Derivative, Debug)]
#[derivative(Default)]
pub struct QuizItemDBO {
  pub id: String,
  pub level: Option<String>,
  pub subject: Option<String>,
  pub title: Option<String>,
  pub options: Option<String>,
  pub opstype: Option<String>,
  pub std_answer: Option<String>,
  pub content_id: Option<String>,
  pub description: Option<String>,
  pub m3u8: Option<String>,
  pub is_master: Option<u32>,
  pub master_id: Option<String>,
  pub created_at: i64,
  pub updated_at: i64,
  pub status: Option<String>,
}
